/**
 * 
 */
package org.bspv.pharma.web.bean.node.visitor;

import java.util.HashMap;
import java.util.Map;

import org.bspv.pharma.web.bean.node.Node;
import org.bspv.pharma.web.bean.node.PlaceNode;
import org.bspv.pharma.web.bean.node.SupplyNode;
import org.bspv.pharma.web.bean.node.TypeNode;

/**
 * @author guillaume
 *
 */
public final class VisitorManager {
	
	private static Map<Class<? extends Node>, Visitor> map = new HashMap<Class<? extends Node>, Visitor>(){
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		{
			put(PlaceNode.class, new PlaceToHtmlVisitor());
			put(SupplyNode.class, new SupplyToHtmlVisitor());
			put(TypeNode.class, new TypeToHtmlVisitor());
		}
	};

	public static Visitor getVisitor(Class<? extends Node> _class) {
		return map.get(_class);
	}
	
}
